<template>
	<swiper 
		class="swiper-article-list"
		:current="activeIndex" 
		@change="setActive"
	>
		<swiper-item
			class="swiper-item"
			v-for="(item,index) in dynastyList"
			:key="index"
		>
			<Article
				:item="item"
				:data="data"
				@getUserLike="getUserLike"
			></Article>
			<!-- <view class="" v-for="item in 100">
				{{item}}
			</view> -->
		</swiper-item>
	</swiper>
</template>

<script>
	export default {
		name:"ArticleList",
		data() {
			return {
				
			};
		},
		props:{
			dynastyList:Array,
			data:Array,
			activeIndex:Number
		},
		methods:{
			setActive(e){
				let index = e.detail.current;
				this.$emit('setActive',index);
			},
			getUserLike(){
				this.$emit('getUserLike');
			}
		}
	}
</script>

<style scoped lang="scss">
	@import './css/ArticleList.scss';
</style>
